package com.poc.train.entity;


import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.bstek.dorado.annotation.PropertyDef;

/**
 * 
 * @author Andy
 *
 */
@Table(name = "POC_DEPT")
@Entity
public class PocDept {

	public static final String DEFAULT_PARENT = "00";

	@Id
	@PropertyDef(label = "部门ID")
	@Column(name = "DEPT_ID", length = 38)
	private String deptId;
	@PropertyDef(label = "部门名称")
	@Column(name = "DEPT_NAME", length = 50)
	private String deptName;
	@PropertyDef(label = "部门说明")
	@Column(name = "DESC_", length = 500)
	private String desc;
	@PropertyDef(label = "是否被禁用")
	@Column(name = "DISABLED")
	private boolean disabled = false;
	@PropertyDef(label = "父编码")
	@Column(name = "PARENT_ID", length = 38)
	private String parentId;
	@Transient
	@PropertyDef(label = "子部门列表")
	private List<PocDept> depts;
	@Transient
	@PropertyDef(label = "当前部门用户列表")
	private List<PocUser> users;
	

	public List<PocUser> getUsers() {
		return users;
	}

	public void setUsers(List<PocUser> users) {
		this.users = users;
	}

	public String getDeptId() {
		return deptId;
	}

	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}

	public List<PocDept> getDepts() {
		return depts;
	}

	public void setDepts(List<PocDept> depts) {
		this.depts = depts;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public boolean isDisabled() {
		return disabled;
	}

	public void setDisabled(boolean disabled) {
		this.disabled = disabled;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}
}
